package com.dy.design_pattern_study.mediator_pattern.dome1.impl;

import com.dy.design_pattern_study.mediator_pattern.dome1.Colleague;
import com.dy.design_pattern_study.mediator_pattern.dome1.Mediator;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-23
 * @Content 具体同事类
 */
public class ConcreteColleague1 extends Colleague {
    public ConcreteColleague1(Mediator mediator) {
        super(mediator);
    }

    //发送信息时，由中介者发送
    public void send(String message){
        mediator.send(message, this);
    }

    public void notifyMessage(String message){
        System.out.println("同事 1 得到信息：" + message);
    }
}
